/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package suministros.ejb30.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author CAROLINA
 */
@Entity
@Table(name = "Cargo")
@NamedQueries({@NamedQuery(name = "Cargo.findAll", query = "SELECT c FROM Cargo c"), @NamedQuery(name = "Cargo.findByCodCargo", query = "SELECT c FROM Cargo c WHERE c.codCargo = :codCargo"), @NamedQuery(name = "Cargo.findByCargo", query = "SELECT c FROM Cargo c WHERE c.cargo = :cargo"), @NamedQuery(name = "Cargo.findByFlagVigente", query = "SELECT c FROM Cargo c WHERE c.flagVigente = :flagVigente"), @NamedQuery(name = "Cargo.findByNivelCargo", query = "SELECT c FROM Cargo c WHERE c.nivelCargo = :nivelCargo")})
public class Cargo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "Cod_Cargo")
    private String codCargo;
    @Basic(optional = false)
    @Column(name = "Cargo")
    private String cargo;
    @Basic(optional = false)
    @Column(name = "flag_vigente")
    private boolean flagVigente;
    @Column(name = "nivel_cargo")
    private Character nivelCargo;

    public Cargo() {
    }

    public Cargo(String codCargo) {
        this.codCargo = codCargo;
    }

    public Cargo(String codCargo, String cargo, boolean flagVigente) {
        this.codCargo = codCargo;
        this.cargo = cargo;
        this.flagVigente = flagVigente;
    }

    public String getCodCargo() {
        return codCargo;
    }

    public void setCodCargo(String codCargo) {
        this.codCargo = codCargo;
    }

    public String getCargo() {
        return cargo;
    }

    public void setCargo(String cargo) {
        this.cargo = cargo;
    }

    public boolean getFlagVigente() {
        return flagVigente;
    }

    public void setFlagVigente(boolean flagVigente) {
        this.flagVigente = flagVigente;
    }

    public Character getNivelCargo() {
        return nivelCargo;
    }

    public void setNivelCargo(Character nivelCargo) {
        this.nivelCargo = nivelCargo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codCargo != null ? codCargo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cargo)) {
            return false;
        }
        Cargo other = (Cargo) object;
        if ((this.codCargo == null && other.codCargo != null) || (this.codCargo != null && !this.codCargo.equals(other.codCargo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "suministros.ejb30.entity.Cargo[codCargo=" + codCargo + "]";
    }

}
